package com.toymate.ai.tts.model.volcengine;

import lombok.Data;

import java.io.Serializable;

/**
 * VolcengineCompletionResponse
 *
 * @author weirdor (179946422@qq.com)
 * @version v1.0.0
 */
@Data
public class VolcengineCompletionResponse implements Serializable {

    private App app;

    private User user;

    private Audio audio;

    private Request request;

    @Data
    public static class App {
        private String appid;
        private String token;
        private String cluster;

        public App(String appid, String token, String cluster) {
            this.appid = appid;
            this.token = token;
            this.cluster = cluster;
        }
    }

    @Data
    public static class User {
        private String uid;

        public User(String uid) {
            this.uid = uid;
        }
    }

    @Data
    public static class Audio {
        private String voice_type;
        private String encoding;
        private int rate;
        private int compression_rate;
        private double speed_ratio;
        private double volume_ratio;
        private double pitch_ratio;
        private String emotion;
        private String language;

        public Audio(String voice_type, String encoding, int compression_rate, double speed_ratio, double volume_ratio, double pitch_ratio, String emotion, String language, int rate) {
            this.voice_type = voice_type;
            this.encoding = encoding;
            this.compression_rate = compression_rate;
            this.speed_ratio = speed_ratio;
            this.volume_ratio = volume_ratio;
            this.pitch_ratio = pitch_ratio;
            this.emotion = emotion;
            this.language = language;
            this.rate = rate;
        }
    }

    @Data
    public static class Request {
        private String reqid;
        private String text;
        private String text_type;
        private String operation;

        public Request(String reqid, String text, String text_type, String operation) {
            this.reqid = reqid;
            this.text = text;
            this.text_type = text_type;
            this.operation = operation;
        }
    }
}
